home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / apmd.config < prev    next >
Encoding:
Text File  |  2007-03-05  |  2.1 KB  |  78 lines

  1. #!/bin/sh
  2.  
  3. # Copyright (c) 2001, 2002 Massachusetts Institute of Technology
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. # General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this package; if not, write to the Free Software
  17. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  18. # 02111-1307, USA.
  19.  
  20. set -e
  21.  
  22. . /usr/share/debconf/confmodule
  23.  
  24. # Remove old variables no longer in use.
  25. db_unregister apmd/etc-apmd-md5 || true
  26. db_unregister apmd/hdparm-drive || true
  27. db_unregister apmd/hdparm-spindown || true
  28.  
  29. CONFFILE=/etc/apm/apmd_proxy.conf
  30.  
  31. NFM="no"
  32. if [ "${1}" = "configure" ]; then
  33.     if dpkg --compare-versions "${2}" "lt-nl" "3.0.2-1.16"; then
  34.     NFM="yes"
  35.     elif [ -e "/etc/modutils/apmd" ]; then
  36.     NFM="yes"
  37.     fi
  38. fi
  39.  
  40. if [ "${NFM}" = "yes" ]; then
  41.     db_input medium apmd/hdparm-removed || true
  42.     db_go || true
  43. fi
  44.  
  45. # Rejection of APM events doesn't yet work; see apmd_proxy.
  46. #
  47. #db_input medium apmd/overwrite-config-file || true
  48. #db_go || true
  49. #
  50. #db_get apmd/overwrite-config-file || true
  51. #if [ "${RET}" = "true" ]; then
  52. #
  53. #    if [ -e "${CONFFILE}" ]; then
  54. #    # Read the values from the config file and save them in the
  55. #    # debconf database.  This preserves them upon reconfiguration or
  56. #    # reinstallation.
  57. #    . "${CONFFILE}" || true
  58. #    if [ -n "${SUSPEND_ON_AC+foo}" ]; then
  59. #        db_set apmd/suspend-on-ac "${SUSPEND_ON_AC}" || true
  60. #    fi
  61. #    fi
  62. #
  63. #    db_beginblock || true
  64. #
  65. #    db_input medium apmd/suspend-on-ac || true
  66. #    db_go || true
  67. #
  68. #    db_endblock || true
  69. #
  70. #fi
  71.  
  72. db_stop
  73.  
  74. # Stop the daemon; it will be restarted in the postinst.
  75. if [ "${1}" = "reconfigure" -a -x "/etc/init.d/apmd" ]; then
  76.     invoke-rc.d apmd stop
  77. fi
  78.